<?php

namespace app\api\model;

use think\Model;

class User extends Model
{
    public function setSexAttr($value)
    {
        $value == '男' && $value = 1;
        $value == '女' && $value = 2;
        return $value;
    }
}
